package com.example.schoolmanage.controller;


import com.example.schoolmanage.domain.Course;
import com.example.schoolmanage.mapper.CourseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 阿远123
 * @since 2023-01-28
 */
@RestController
@RequestMapping(value = "test1",method = RequestMethod.GET)
public class CourseController {
    @Autowired
    CourseMapper courseMapper;
    @GetMapping
    public List<Course> test1() {
//        List<Course> courseList = courseMapper.selectList(null);
//        courseList.forEach(System.out::println);
        return courseMapper.selectList(null);
    }

}

